package com.tingyuge.base.thread.wang.chapter3;

/**
 * Created by xiaodao
 * date: 2019/11/28
 */
public class CreateThread {
    public static void main(String[] args) {
        Thread thread = new Thread(){
            @Override
            public void run() {
                System.out.println("----");
            }
        };
        thread.start();
        //2构造函数
        Thread t1 = new Thread(()->{
            System.out.println("ruanble");
        },"name-1");
        t1.start();
        System.out.println(t1.getName());
    }
}
